{% extends 'base.html' %}
{% block content %}
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief" style="height: 600px">
  <ul class="layui-tab-title">
    <li class="layui-this">创建Deployment</li>
    <li>创建Service</li>
    <li>创建Ingress路由</li>
  </ul>
  <div class="layui-tab-content">
    <div class="layui-tab-item layui-show" >
        <form method="post" action="/new_deploy" class="layui-form">
{#        <fieldset style="height: 500px">#}
        <legend>[Deployment自定义]</legend>
            <label><b>Pod基础属性：</b></label><br>
        NameSpace:<br>
        <input type="text" name="namespace" value="namespace" class="layui-input" style="width: 200px">
        Appname:<br>
        <input type="text" name="appname" value="appname" class="layui-input" style="width: 200px">
        Label:<br>
        <input type="text" name="label" value="label" class="layui-input" style="width: 200px">
        副本数:<br>
        <input type="text" name="repl" value="repl" class="layui-input" style="width: 100px">
        MatchLabels:<br>
        <input type="text" name="matchlabel" value="matchlabel" class="layui-input" style="width: 200px">
        <hr>
            <label><b>容器属性：</b></label><br>
        Images:<br>
        <input type="text" name="images" value="images" class="layui-input" style="width: 300px">
        ContainerPort:
        <input type="text" name="port" value="port" class="layui-input" style="width:50px">
        Command:<br>
        <input type="text" name="command" value="command" class="layui-input" style="width: 200px"><br>
            <label><b>资源配额：</b></label><br>
        requests:<br>
        <input type="text" name="rmem" value="mem" class="layui-input" style="width: 200px">
        <input type="text" name="rcpu" value="cpu" class="layui-input" style="width: 200px">
        limit:<br>
        <input type="text" name="lmem" value="mem" class="layui-input" style="width: 200px">
        <input type="text" name="lcpu" value="cpu" class="layui-input" style="width: 200px">
        <br>
        <input type="submit" class="layui-btn" value="创建">
{#        </fieldset>#}
        </form>
    </div>

    <div class="layui-tab-item">
        <form>
{#        <fieldset>#}
        <legend>[Service自定义]</legend>
            <label><b>服务属性：</b></label><br>
        NameSpace:<br>
        <input type="text" name="namespace" value="namespace" class="layui-input" style="width: 200px"><br>
        App name:<br>
        <input type="text" name="appname" value="appname" class="layui-input" style="width: 200px"><br>
        Label:<br>
        <input type="text" name="label" value="label" class="layui-input" style="width: 200px"><br>
        ServiceName:<br>
        <input type="text" name="sname" value="sname" style="width: 200px" class="layui-input"><br>
        ServicePort:
        <input type="text" name="sport" value="sport" class="layui-input"  style="width: 100px"><br>
        ContainerPort:
        <input type="text" name="port" value="port" class="layui-input" style="width: 100px"><br>
        NodePort:
        <input type="text" name="nodeport" value="nodeport" class="layui-input" style="width: 100px"><br>
        <input type="submit" class="layui-btn" value="创建">
{#        </fieldset>#}
        </form>
    </div>
    <div class="layui-tab-item">
        <form>
{#        <fieldset>#}
        <legend>[Ingress自定义]</legend>
            <label><b>路由属性：</b></label><br>
        NameSpace:<br>
        <input type="text" name="namespace" value="namespace" class="layui-input" style="width: 200px"><br>
        Ingress name:<br>
        <input type="text" name="iname" value="iname" class="layui-input" style="width: 200px"><br>
        Schema:<br>
        <input type="text" name="schema" value="schema" class="layui-input" style="width: 200px"><br>
        ServiceName:<br>
        <input type="text" name="sname" value="sname" class="layui-input" style="width: 200px"><br>
        ServicePort:<br>
        <input type="text" name="sport" value="sport" class="layui-input" style="width: 100px"><br>
        Path:<br>
        <input type="text" name="path" value="path" class="layui-input" style="width: 100px"><br>
        <input type="submit" class="layui-btn" value="创建">
{#        </fieldset>#}
        </form>
    </div>
  </div>
</div>
{% endblock %}

{% block js %}
<script>
layui.use('element', function(){
  var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

  //监听导航点击
  element.on('nav(demo)', function(elem){
    //console.log(elem)
    layer.msg(elem.text());
  });
});
</script>
{% endblock %}

